﻿@model Dinamico.Models.PartVersionModel
@{ Html.Resources().JavaScript("~/Scripts/customNative.js"); }
<script type="text/javascript" language="javascript">
    searchObj = new SearchObj();
    ver_1 = '';
    ver_2 = '';
    setversion1 = function (kol, image) {
        if (ver_1.indexOf(kol) == -1) {
            $(image).css('border', "solid 4px red");
            ver_1 += ',' + kol;
        } else {
            $(image).css('border', "solid 4px white");
            ver_1 = ver_1.replace(',' + kol, '');
        }
    }
    setversion2 = function (kol, image) {

        if (ver_2.indexOf(kol) == -1) {
            $(image).css('border', "solid 4px red");
            ver_2 += ','+kol;
        } else {
            $(image).css('border', "solid 4px white");
            ver_2 = ver_2.replace(',' + kol, '');
        }

    }
    clicksearch = function (kol) {
        if (ver_1 != '' && ver_2 != '') {
            searchObj.printVersion3('@Model.MainName', ver_1, ver_2);
        } else {
            alert('Nie wybrano takniny lub drewna. Proszę dokonaj wyboru')
        }
    }

</script>
<div class="filter">
    <div class="version1">
        <div>Tkaniny:</div>
        <div class="vImage">
            <img src="/Upload/wzorniki/001.jpg" alt="" onclick="setversion1('001',this)" />
        </div>
        <div class="vImage">
            <img src="/Upload/wzorniki/002.jpg" alt="" onclick="setversion1('002',this)" />
        </div>
        <div class="vImage">
            <img src="/Upload/wzorniki/003.jpg" alt="" onclick="setversion1('003',this)" />
        </div>
        <div class="vImage">
            <img src="/Upload/wzorniki/004.jpg" alt="" onclick="setversion1('004',this)" />
        </div>
        <div class="vImage">
            <img src="/Upload/wzorniki/005.jpg" alt="" onclick="setversion1('005',this)" />
        </div>
        <div class="vImage">
            <img src="/Upload/wzorniki/006.jpg" alt="" onclick="setversion1('006',this)" />
        </div>
        <div class="v2Image">
            <img src="/Upload/wzorniki/007.jpg" alt="" onclick="setversion1('007',this)" />
        </div>
        <div class="vImage">
            <img src="/Upload/wzorniki/008.jpg" alt="" onclick="setversion1('008',this)" />
        </div>
        <div class="vImage">
            <img src="/Upload/wzorniki/009.jpg" alt="" onclick="setversion1('009',this)" />
        </div>
        <div class="v2Image">
            <img src="/Upload/wzorniki/010.jpg" alt="" onclick="setversion1('010',this)" />
        </div>
        <div class="v2Image">
            <img src="/Upload/wzorniki/011.jpg" alt="" onclick="setversion1('011',this)" />
        </div>
        <div class="v2Image">
            <img src="/Upload/wzorniki/012.jpg" alt="" onclick="setversion1('012',this)" />
        </div>
        <div class="v2Image">
            <img src="/Upload/wzorniki/014.jpg" alt="" onclick="setversion1('014',this)" />
        </div>
        <div class="v2Image">
            <img src="/Upload/wzorniki/015.jpg" alt="" onclick="setversion1('015',this)" />
        </div>
        <div class="v3Image">
            <img src="/Upload/wzorniki/301.jpg" alt="" onclick="setversion1('301',this)" />
        </div>
        <div class="v3Image">
            <img src="/Upload/wzorniki/346.jpg" alt="" onclick="setversion1('346',this)" />
        </div>
        <div class="v3Image">
            <img src="/Upload/wzorniki/349.jpg" alt="" onclick="setversion1('349',this)" />
        </div>
        <div class="v3Image">
            <img src="/Upload/wzorniki/351.jpg" alt="" onclick="setversion1('351',this)" />
        </div>
        <div class="v3Image">
            <img src="/Upload/wzorniki/366.jpg" alt="" onclick="setversion1('366',this)" />
        </div>
        <div class="v3Image">
            <img src="/Upload/wzorniki/520.jpg" alt="" onclick="setversion1('520',this)" />
        </div>
        <div class="v3Image">
            <img src="/Upload/wzorniki/532.jpg" alt="" onclick="setversion1('532',this)" />
        </div>
        <div class="v3Image">
            <img src="/Upload/wzorniki/536.jpg" alt="" onclick="setversion1('536',this)" />
        </div>
        <div class="v3Image">
            <img src="/Upload/wzorniki/550.jpg" alt="" onclick="setversion1('550',this)" />
        </div>
        <div class="v3Image">
            <img src="/Upload/wzorniki/551.jpg" alt="" onclick="setversion1('551',this)" />
        </div>
        <div class="v3Image">
            <img src="/Upload/wzorniki/552.jpg" alt="" onclick="setversion1('552',this)" />
        </div>
        <div class="v3Image">
            <img src="/Upload/wzorniki/553.jpg" alt="" onclick="setversion1('553',this)" />
        </div>
        <div class="v3Image">
            <img src="/Upload/wzorniki/554.jpg" alt="" onclick="setversion1('554',this)" />
        </div>
        <div class="v3Image">
            <img src="/Upload/wzorniki/555.jpg" alt="" onclick="setversion1('555',this)" />
        </div>
        <div class="v3Image">
            <img src="/Upload/wzorniki/556.jpg" alt="" onclick="setversion1('556',this)" />
        </div>
        <div class="v3Image">
            <img src="/Upload/wzorniki/nub1.jpg" alt="" onclick="setversion1('nub1',this)" />
        </div>
    </div>
    <div class="version2">
        <div>
            Materiały:</div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/d01k.jpg" alt="" onclick="setversion2('d01',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/m01.jpg" alt="" onclick="setversion2('m01',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/m02.jpg" alt="" onclick="setversion2('m02',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/156.jpg" alt="" onclick="setversion2('156',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/176.jpg" alt="" onclick="setversion2('176',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/201.jpg" alt="" onclick="setversion2('201',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/203.jpg" alt="" onclick="setversion2('203',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/210.jpg" alt="" onclick="setversion2('210',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/229.jpg" alt="" onclick="setversion2('229',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/230.jpg" alt="" onclick="setversion2('230',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/234.jpg" alt="" onclick="setversion2('234',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/236.jpg" alt="" onclick="setversion2('234',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/240.jpg" alt="" onclick="setversion2('240',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/243.jpg" alt="" onclick="setversion2('243',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/245.jpg" alt="" onclick="setversion2('245',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/253.jpg" alt="" onclick="setversion2('253',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/268.jpg" alt="" onclick="setversion2('268',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/269.jpg" alt="" onclick="setversion2('nub1',this)" />
        </div>
        <div class="v4Image">
            <img src="/Upload/wzorniki/nub1.jpg" alt="" onclick="setversion1('nub1',this)" />
        </div>
    </div>
    <div>
    <a onclick="clicksearch(this)" class="bbutton">Filtrój</a>
</div>
</div>



<div class="standard" id="loading">
    <img src="/Upload/sv/ajax-loader.gif" style="border: 10px none papayaWhip;" alt="" />Wyszukiwanie....
</div>
<div class="standard" id="maincontainer">
</div>
<script type="text/javascript" language="javascript">
    $(document).ready(function () { searchObj.printVersion('@Model.MainName'); }); </script>
